package system

import (
	"gin-admin/handler"
	"gin-admin/middleware"

	"github.com/gin-gonic/gin"
)

func RegisterRoleRoutes(group *gin.RouterGroup) {
	roleGroup := group.Group("/role")
	handlerApp := handler.NewHandlerApp(nil)
	roleGroup.Use(middleware.AuthorizationMiddleware())
	{
		roleGroup.POST("/create", handlerApp.V1App.RoleHandler.CreateRoleHandler)
		roleGroup.DELETE("/delete", handlerApp.V1App.RoleHandler.DeleteRoleHandler)
		roleGroup.PUT("/modify", handlerApp.V1App.RoleHandler.ModifyRoleHandler)
		roleGroup.GET("/info", handlerApp.V1App.RoleHandler.GetRoleInfoHandler)
		roleGroup.GET("/list", handlerApp.V1App.RoleHandler.GetRoleListHandler)
	}
}
